# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html
import json
import typing

import scrapy


class DumpfileItem(scrapy.Item):
    # define the fields for your item here like:
    name = scrapy.Field()
    keyword = scrapy.Field()


class MyEncoder_DumpfileItem(json.JSONEncoder):
    def default(self, o):
        if isinstance(o, DumpfileItem):
            return str(o['title'])
        else:
            return super().default(o)